package com.ghc.controller;

import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/demo")
public class DemoController {

    @RequestMapping("/test")
    public String test(){
        //获取自定义到jwt的参数
        Object details = SecurityContextHolder.getContext().getAuthentication().getDetails();
        //远程调用简历微服务 RestTemplate
        return details.toString();
    }

}
